/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.5;
  font-weight: 400;
  
  color-scheme: light;
  color: #333;
  background-color: #ffffff;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 深色主题样式 */
.dark-theme {
  color-scheme: dark;
  color: #d4d4d4;
  background-color: #121212;
}

.dark-theme :root {
  color-scheme: dark;
  color: #d4d4d4;
  background-color: #121212;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

#app {
  width: 100%;
  height: 100vh;
}

/* Markdown内容样式 */
.markdown-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  color: #333;
  line-height: 1.6;
}

/* 深色主题下的Markdown内容样式 */
.dark-theme .markdown-content {
  color: #d4d4d4;
}

.dark-theme .markdown-content h1,
.dark-theme .markdown-content h2,
.dark-theme .markdown-content h3,
.dark-theme .markdown-content h4,
.dark-theme .markdown-content h5,
.dark-theme .markdown-content h6 {
  color: #ffffff;
}

.dark-theme .markdown-content code {
  background-color: #2d2d2d;
  color: #e96900;
}

.dark-theme .markdown-content pre {
  background-color: #1e1e1e;
  border: 1px solid #333;
}

.dark-theme .markdown-content pre code {
  background-color: transparent;
  color: #d4d4d4;
}

.dark-theme .markdown-content a {
  color: #42b983;
  text-decoration: underline;
}

.dark-theme .markdown-content a:hover {
  color: #42b983;
  text-decoration: none;
}

.dark-theme .markdown-content blockquote {
  color: #b0b0b0;
  border-left-color: #42b983;
  background-color: #1e1e1e;
  padding: 10px 15px;
  border-radius: 4px;
}

.dark-theme .markdown-content th {
  background-color: #2d2d2d;
  color: #ffffff;
}

.dark-theme .markdown-content td {
  color: #d4d4d4;
}

.dark-theme .markdown-content table {
  border-color: #333;
}

.dark-theme .markdown-content th,
.dark-theme .markdown-content td {
  border-color: #333;
}

.dark-theme .markdown-content ul,
.dark-theme .markdown-content ol {
  color: #d4d4d4;
}

.dark-theme .markdown-content p {
  color: #d4d4d4;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: #2c3e50;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 2em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.markdown-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content p {
  margin-bottom: 1em;
}

.markdown-content a {
  color: #42b983;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.markdown-content li {
  margin-bottom: 0.5em;
}

.markdown-content code {
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 0.2em 0.4em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 85%;
  color: #e96900;
}

.markdown-content pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 1em;
  overflow: auto;
  margin-bottom: 1em;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.markdown-content blockquote {
  border-left: 4px solid #42b983;
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 1em;
  color: #666;
}

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #ddd;
  padding: 8px;
}

.markdown-content th {
  background-color: #f8f8f8;
  font-weight: 600;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 深色主题下的滚动条样式 */
.dark-theme ::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark-theme ::-webkit-scrollbar-thumb {
  background: #555;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: #777;
}
